//编写一个Counter类，表示捡录计数器，用于统计进入房间的人数。
public class Counter
{
 int thenumofpeople;
 //Constructor:Sets the initial value'
 public Counter()
 {
  thenumofpeople = 0;
 }
 //编写一个click方法。
 public int click()
 {
   thenumofpeople += 1;
   return thenumofpeople;
 }
 //返回当前的计数值。
 public int getCount()
 {
   return thenumofpeople;
 }
 //将计数值重新设置为0.
 public int reset()
 {
   thenumofpeople = 0;
   return thenumofpeople;
 }
 public String toString()
 {
  String result = Integer.toString(thenumofpeople);
  return result;
 }
} 

